package io.renren.modules.efinance.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.efinance.entity.AccountEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.Map;

/**
 *
 *
 * @author lhf
 * @email i@lhf.com
 * @date 2022-06-24 17:18:43
 */
@Mapper
public interface AccountDao extends BaseMapper<AccountEntity> {
    int selectamount(String accountId, String accountRealname);

    int updateamount(String accountId, String accountRealname, int new_amount);

    default Map<String, String> selectSaltAndPassword(String accountId) {
        return null;
    }

    @Update("update account set account_balance=account_balance+#{accountBalance}} where account_name=#{accountName}}")
    int recharge(AccountEntity accountEntity);
}
